package com.marktotop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.marktotop.entity.business.Vaccine;
import com.marktotop.error.SystemException;
import com.marktotop.response.ResultBean;
import com.marktotop.vo.business.VaccineToDevolutionVO;
import com.marktotop.vo.business.VaccineVO;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-12
 */
public interface IVaccineService extends IService<Vaccine> {

    /**
     * 分页展示所有疫苗列表，并进行模糊查询
     *
     * @param pageNum
     * @param pageSize
     * @param vaccineVO
     * @return
     */
    ResultBean findVaccinesList(Integer pageNum, Integer pageSize, VaccineVO vaccineVO);


    /**
     * 获取某一疫苗完整信息
     *
     * @param id
     * @return
     */
    VaccineVO getVaccineInfo(Long id);


    /**
     * 修改疫苗的剩余量 (减去 疫苗的下发数)
     *
     * @param vaccineVO
     * @param stock
     * @return
     * @throws SystemException
     */
    boolean editOverage(VaccineVO vaccineVO, Integer stock) throws SystemException;


    /**
     * 获取所有疫苗列表，供疫苗下发使用
     *
     * @return
     */
    List<VaccineToDevolutionVO> findAllVaccinesForOther();


    /**
     * 删除疫苗信息（删除剩余量为0的单个疫苗记录）
     *
     * @param id
     * @return
     * @throws SystemException
     */
    boolean removeVaccineRecord(Long id) throws SystemException;
}
